Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.platform.picture.commandline.imagemagick

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.commandline.imagemagick">

  <require>org.nuxeo.ecm.platform.commandline.executor.service.defaultContrib</require>

  <extension target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent"
    point="command">

    <command name="identify" enabled="true">
      <commandLine>identify</commandLine>
      <parameterString> -ping -format '%m %w %h %z' #{inputFilePath}[0]</parameterString>
      <winParameterString> -ping -format "%m %w %h %z" #{inputFilePath}[0]</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="crop" enabled="true">
      <commandLine>stream</commandLine>
      <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0]  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </parameterString>
      <winParameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}  - | convert -depth 8 -size #{tileWidth}x#{tileHeight}  rgb:-  #{outputFilePath} </winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="resizer" enabled="true">
      <commandLine>convert</commandLine>
      <parameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-flatten -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="gifResizer" enabled="true">
      <commandLine>convert</commandLine>
      <parameterString>#{inputFilePath} -coalesce -resize #{targetWidth}x#{targetHeight} -depth #{targetDepth} -deconstruct #{outputFilePath}</parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="rotate" enabled="true">
      <commandLine>convert</commandLine>
      <parameterString>-rotate #{angle} #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-rotate #{angle} #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="cropAndResize" enabled="true">
      <commandLine>stream</commandLine>
      <parameterString> -map rgb -storage-type char -extract  #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath} - | convert -depth 8 -size #{tileWidth}x#{tileHeight} -resize #{targetWidth}x#{targetHeight}!  rgb:-  #{outputFilePath} </parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="converter" enabled="true">
      <commandLine>convert</commandLine>
      <parameterString>-colorspace rgb #{inputFilePath}[0] #{outputFilePath}</parameterString>
      <winParameterString>-colorspace rgb #{inputFilePath} #{outputFilePath}</winParameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

    <command name="multiTiler" enabled="true">
      <commandLine>convert</commandLine>
      <parameterString>#{inputFilePath}  -crop #{tileWidth}x#{tileHeight} + repage   #{outputFilePath}</parameterString>
      <installationDirective>You need to install ImageMagic.</installationDirective>
    </command>

  </extension>

</component>